package com.kxf.rpc.handler;

import com.kxf.rpc.entity.RPCRequest;
import com.kxf.rpc.serializer.CommonSerialize;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.Socket;

/**
 * @author Kxf
 * @create 2021/9/22,0022 22:05
 */
public interface CommonHandler {

    void response(Socket socket, CommonSerialize serialize) throws IOException, NoSuchMethodException,
            IllegalAccessException, InvocationTargetException;

    Object invoke(RPCRequest request) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;
}
